package com.enjoyor.soa.traffic.core.tpcms.mapper.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.enjoyor.soa.traffic.core.tpcms.constant.InfoWhiteListSqlId;
import com.enjoyor.soa.traffic.core.tpcms.domain.InfoWhiteList;
import com.enjoyor.soa.traffic.core.tpcms.mapper.IInfoWhiteListMapper;
import com.enjoyor.soa.traffic.frame.support.mybatis.mapper.impl.BaseMapper;

@Service
@Transactional
public class InfoWhiteListMapper extends BaseMapper<InfoWhiteList> implements IInfoWhiteListMapper {

    @Override
    public List<InfoWhiteList> selectListInfo(Map<String, Object> map) {
        return sqlSessionTemplate.selectList(getSqlName(InfoWhiteListSqlId.SQL_SELECT_LIST), map);
    }

    @Override
    public List<InfoWhiteList> selectByLicenseNumber(String licenseNumber) {
        return sqlSessionTemplate.selectList(getSqlName(InfoWhiteListSqlId.SQL_SELECT_LIST_BY_LICENSE_NUMBER),
                licenseNumber);
    }

    @Override
    public void insertBatch(List<InfoWhiteList> whiteLists) {
        sqlSessionTemplate.insert(getSqlName(InfoWhiteListSqlId.SQL_SELECT_LIST), whiteLists);
    }

}
